package net.tngou.crawler.runnable;

import org.apache.commons.pool2.impl.GenericObjectPool;

import net.tngou.crawler.pojo.POJO;



/**
 * 线程
 * @author tngou@tngou.net
 *
 */
public class BaseThread extends Thread {

	public POJO pojo;
    private GenericObjectPool<BaseThread> pool;


    public void setData(POJO pojo) {
    	this.pojo = pojo;
	}
 

    public void setPool(GenericObjectPool<BaseThread> pool) {
        this.pool = pool;
    }

   
 
    @Override
    public  void run() {
        
       System.out.println(this.getName() + "开始处理");
        /**
          * 
        */
        System.out.println(this.getName() + "结束处理");
        try {
             pool.returnObject(this);
        } catch (Exception ex) {
              System.out.println(ex);
         }
                
            
        
    }

	
}
